package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysGoodsclassificationMapper;
import com.ruoyi.system.domain.SysGoodsclassification;
import com.ruoyi.system.service.ISysGoodsclassificationService;
import com.ruoyi.common.core.text.Convert;

/**
 * 供货分类实体Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-12-13
 */
@Service
public class SysGoodsclassificationServiceImpl implements ISysGoodsclassificationService 
{
    @Autowired
    private SysGoodsclassificationMapper sysGoodsclassificationMapper;

    /**
     * 查询供货分类实体
     * 
     * @param goodsClassificationId 供货分类实体ID
     * @return 供货分类实体
     */
    @Override
    public SysGoodsclassification selectSysGoodsclassificationById(Long goodsClassificationId)
    {
        return sysGoodsclassificationMapper.selectSysGoodsclassificationById(goodsClassificationId);
    }

    /**
     * 查询供货分类实体列表
     * 
     * @param sysGoodsclassification 供货分类实体
     * @return 供货分类实体
     */
    @Override
    public List<SysGoodsclassification> selectSysGoodsclassificationList(SysGoodsclassification sysGoodsclassification)
    {
        return sysGoodsclassificationMapper.selectSysGoodsclassificationList(sysGoodsclassification);
    }
    /**
     * 查询供货分类实体带商品列表
     *
     * @return 供货分类实体集合
     */
    public List<SysGoodsclassification> selectSysGoodList(){
        return sysGoodsclassificationMapper.selectSysGoodList();
    }
    /**
     * 新增供货分类实体
     * 
     * @param sysGoodsclassification 供货分类实体
     * @return 结果
     */
    @Override
    public int insertSysGoodsclassification(SysGoodsclassification sysGoodsclassification)
    {
        sysGoodsclassification.setCreateTime(DateUtils.getNowDate());
        return sysGoodsclassificationMapper.insertSysGoodsclassification(sysGoodsclassification);
    }

    /**
     * 修改供货分类实体
     * 
     * @param sysGoodsclassification 供货分类实体
     * @return 结果
     */
    @Override
    public int updateSysGoodsclassification(SysGoodsclassification sysGoodsclassification)
    {
        return sysGoodsclassificationMapper.updateSysGoodsclassification(sysGoodsclassification);
    }

    /**
     * 删除供货分类实体对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysGoodsclassificationByIds(String ids)
    {
        return sysGoodsclassificationMapper.deleteSysGoodsclassificationByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除供货分类实体信息
     * 
     * @param goodsClassificationId 供货分类实体ID
     * @return 结果
     */
    @Override
    public int deleteSysGoodsclassificationById(Long goodsClassificationId)
    {
        return sysGoodsclassificationMapper.deleteSysGoodsclassificationById(goodsClassificationId);
    }
}
